import ajax from '@/api/apiConfig.js'

export const checkLogin = (data) => {
  return ajax.post('user/checkLogin', data)
}

export const requestLogin = (data) => {
  return ajax.post('user/checkLogin', data)
}

export const getUserInfor = (data) => {
  return ajax.get('user/getUser', data)
}

export const logout = (data) => {
  return ajax.get('user/logout', data)
}

/* 根据平台标识获取平台编码
 */
export const findOrgByOrgCode = (data) => {
  return ajax.get('user/findOrgByOrgCode', data)
}

export const getRemoteFile = (url, data) => {
  return ajax.getRemoteFile(url, data)
}

/* 获取融云token */
export const getRongIMToken = (data) => {
  return ajax.get('user/getRongIMToken', data)
}

/* 发起聊天 */
export const callUser = (data) => {
  return ajax.get('user/callUser', data)
}

/* 获取用户阿里云RTCtoken */
export const getAliRTCToken = (data) => {
  return ajax.get('user/getAliRTCToken', data)
}
